﻿using System;
using System.Collections.Generic;

using System.Text;

namespace DotNETX.Authentication
{
    public class UserManager : IUserManager
    {
        public delegate UserIdentifier FindHandler(string loginid);
        public delegate bool SetPasswordHandler(string loginid, string pwd);
        public FindHandler QueryUser { get; set; }
        public SetPasswordHandler SetPwd { get; set; }

        UserIdentifier IUserManager.Find(string loginid)
        {
            if (QueryUser == null) return null;
            return QueryUser(loginid);
        }

        bool IUserManager.SetPassword(string loginid, string pwd)
        {
            throw new NotImplementedException();
        }
    }
}
